//
//  XMFilterCollectionCell.m
//  XMFilterView
//
//  Created by mac on 2019/11/21.
//  Copyright © 2019 aishangliguo. All rights reserved.
//

#import "XMFilterCollectionCell.h"

// Model
#import "XMNameModel.h"

@implementation XMFilterCollectionCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self.contentView addSubview:self.collLabel];
    }
    return self;
}

- (void)setNameModel:(XMNameModel *)nameModel {
    _nameModel = nameModel;
    _collLabel.text = nameModel.content;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    self.collLabel.frame = self.bounds;
}

- (UILabel *)collLabel {
    if (!_collLabel) {
        _collLabel = [[UILabel alloc] init];
        _collLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _collLabel;
}

@end
